-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add all_cars_in_dragway python demo; Remove C++ automotive_demo #396
Conversation
@stonier just to double check: last time we spoke about python bindings I recall we decided not to work on the trajectory car, as that was (is?) undergoing a refactoring in drake. As we port this demo from C++ to port we would remove the last demo that showed that car. Is that ok? Want me to add an issue for milestone 3 to bring it back? |
08fbb62
to
ac2e16b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @apojomovsky , just left a comment about refactoring car-creation functions.
|
||
SIMULATION_TIME_STEP_SECS = 0.001 | ||
|
||
def add_simple_car(simulator): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is not specific of this issue, but seems like a good time to do it. Could you please move this functions to simulation_utils.py
and make them parametrizable? Then you could use them in loadable_agent_simulation.py
and railcar_in_multilane.py
(as well as refactoring the build_simple_car_simulator
in simulation_utils.py
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good! done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nit-picks. Overall looks great!
SIMULATION_TIME_STEP_SECS = 0.001 | ||
|
||
def add_simple_car(simulator): | ||
"""Instanciates a new Simple Prius Car |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky here and below, typo instanciates
-> instantiates
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, thanks! done!
"lane_direction": Any(lane_direction), | ||
"start_params": Any(start_params) | ||
} | ||
# Instantiate a Loadable Rail Car. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apojomovsky Instantiate
-> Instantiates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for that, fixed!
b282b89
to
22a3b07
Compare
Some minor things:
The |
Yes, a new trajectory agent just went into Drake. Mostly RobotLocomotion/drake#8720 and RobotLocomotion/drake#8725. I'll probably play with them as I do this 'has-a' relationship between delphyne loadable wrappers and Drake agents. |
Ack, thanks for the heads-up @stonier on new trajectory agents in Drake. |
22a3b07
to
33d7af9
Compare
Thanks for you feedback @stonier ! I just finished addressing your comments. |
Should at least have something that tickles the possibility of loading without roads (~ loadable_agents_demo with simple car previously). If that's just in as a test, that's also fine - i.e. doesn't have to be a demo. |
There are a couple of demos that already exercises this no-road functionality: |
Agreed |
Fixes the first item of the first list in #378
demo_launcher.py
as well as theautomotive_demo.cc
.all_cars_in_dragway
python demo, with the same basic functionality as the pairdemo_launcher + automotive_demo
.Missing:
CreateTrajectoryParams
function, in order to generate the parameters for the car.